// 导入axios实例
import service from '../utils/http'

// 库存相关API接口
export const inventoryApi = {
  // 获取库存列表
  getInventory: (params) => service.get('/inventory/getInventory', { params }),
  // 获取商品列表
  getGoods: (params) => service.get('/goods', { params}),
  // 获取仓库列表
  getWarehouse: (params) => service.get('/house', { params }),
  // 获取库存明细
  getInventoryDetail: (params) => service.get('/inventory/getInventoryLog', { params }),
  
  // 获取仓库区域列表
  getAreaInfo: (params) => service.get('/inventory/getAreaInfo', { params }),
  // 获取仓库信息
  getHouseInfo: (params) => service.get('/inventory/getHouseInfoById', { params }),

  // 获取商品库存信息
  getInventoryByGoodsId: (params) => service.get('/inventory/getInventoryByGoodsId', { params }),

  // 更新商品库存信息
  putInventoryInfo: (body) => service.put('/inventory/putInventoryInfo', body),

  // 添加库存记录
  addInventoryLog: (body) => service.post('/inventory/addInventoryLog', body),

  // 添加库存记录
  addInventory: (body) => service.post('/inventory/addInventory', body)


}

export default inventoryApi